package com.light.common.enums;

/**
 * 错误码枚举类
 */
public enum ExceptionEnum {

    UNKNOW_EXCEPTION(10000,"系统未知异常"),
    VAILD_EXCEPTION(10001,"参数格式校验失败"),
    PRODUCT_UP_EXCEPTION(10002,"商品上架错误!"),
    TOO_MANY_REQUEST_EXCEPTION(10003,"请求次数过多"),
    USER_EXIST_EXCEPTION(15001,"用户已存在!"),
    PHONE_EXIST_EXCEPTION(15002,"手机号已存在!"),
    NOT_EXIST_EXCEPTION(15003,"用户不存在!"),
    PASSWORD_ERROR_EXCEPTION(15003,"密码错误!"),
    SOCIAL_LOGIN_EXCEPTION(15004,"社交登录错误"),

    INVALIDATED_USERINFO_EXCEPTION(16001,"用户标识不存在"),

    NO_STOCK_EXCEPTION(17001,"商品库存不足");

    private int code;
    private String value;

    ExceptionEnum(int code,String value){
        this.code = code;
        this.value = value;
    }

    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }

    public String getValue() {
        return value;
    }

    public void setValue(String value) {
        this.value = value;
    }
}
